import { createApp } from "vue";
import App from "./App.vue";
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
import zhCn from "element-plus/es/locale/lang/zh-cn";
import router from "./router";
import store from "./store";
import urlApi from "./util/urlApi";
import Request from '@/util/request';

// 自定义样式组件
import NavigationBar from "@/components/NavigationBar/index.vue";
import TreeMenu from "@/components/TreeMenu/index.vue";




const app = createApp(App);

// 注册全局组件
app.component("navigation-bar", NavigationBar);
app.component("tree-muen", TreeMenu);

const fileIcon = {'type':'icon'}
const fileAvatar = {'type':'avatar'}
const fileBackground = {'type':'background'}

app.config.globalProperties.$urlApi = urlApi;
app.config.globalProperties.$Request = Request;
app.config.globalProperties.$fileIcon = fileIcon;
app.config.globalProperties.$fileAvatar = fileAvatar;
app.config.globalProperties.$fileBackground = fileBackground;

// 引入组件
app.use(ElementPlus, { locale: zhCn });
app.use(store).use(router).mount("#app");
